import home from '@/views/home/home.vue'


const routes = [
    {
        path: '/',
        redirect: '/login',
        hidden: true
    },
    {
        path: '/login',
        name: 'login',
        hidden: true,
        component: () => import(/*webpackChunkName: "demo"*/ '@/views/login/index.vue'),
        meta: { title: '登录', breadcrumb: false }
    },
    // 部门组织架构
    // {
    //     path: '/companyOrganizational',
    //     name: 'companyOrganizational',
    //     meta: { title: '部门组织架构', breadcrumb: true },
    //     component: () => import(/*webpackChunkName: "demo"*/ '@/views/systemManage/companyOrganizational/index.vue')
    // },
    {
        path: '/dashboard',
        name: 'dashboard',
        meta: { title: '仪表盘', breadcrumb: true },
        component: () => import(/*webpackChunkName: "demo"*/ '@/layout/index.vue'),
        children: [
            // 聚合页
            {
                path: 'home',
                name: 'home',
                meta: { title: '首页' },
                component: home
            },
            // 数据首页
            {
                path: 'dataIndex',
                name: 'dataIndex',
                meta: { title: '数据首页' },
                component: () => import(/*webpackChunkName: "demo"*/ '@/views/dataIndex/index.vue')
            },
            {
                path: 'videoReal',
                name: 'videoReal',
                component: () => import('@/views/videoReal/index.vue'),
                meta: { title: '实时视频', breadcrumb: true },

            },
            // demo
            {
                path: 'demo',
                name: 'demo',
                hidden: true,
                component: () => import(/*webpackChunkName: "demo"*/ '@/views/demo'),
                meta: { title: 'demo', breadcrumb: false }
            },
        ]
    },
    {
        path: '/system',
        name: 'system',
        meta: { title: '系统管理', breadcrumb: true },
        component: () => import(/*webpackChunkName: "demo"*/ '@/layout/index.vue'),
        children: [
            {
                // /system/userList
                path: 'userList',
                name: 'userList',
                meta: { title: '用户管理', breadcrumb: true },
                component: () => import('@/views/systemManage/userList/index.vue')
            },
            {
                // /system/roleList
                path: 'roleList',
                name: 'roleList',
                meta: { title: '角色管理', breadcrumb: true },
                component: () => import('@/views/systemManage/roleList/index.vue')
            },
            // {
            //     // /system/limitList
            //     path: 'limitList',
            //     name: 'limitList',
            //     meta: { title: '权限管理', breadcrumb: true },
            //     component: () => import('@/views/systemManage/limitList/index.vue')
            // },
            {
                // /system/menuList
                path: 'menuList',
                name: 'menuList',
                meta: { title: '菜单管理', breadcrumb: true },
                component: () => import('@/views/systemManage/menuList/index.vue')
            },
            {
                // /system/dataDict
                path: 'dataDict',
                name: 'dataDict',
                meta: { title: '数据字典', breadcrumb: true },
                component: () => import('@/views/systemManage/dataDict/index.vue')
            },
        ]
    },

    // 资源管理 >  场站管理
    {
        path: '/resource',
        name: 'resource',
        component: () => import(/*webpackChunkName: "demo"*/ '@/layout/index.vue'),
        meta: { title: '资源管理', breadcrumb: true },
        children: [
            {
                path: 'siteManage',
                name: 'siteManage',
                component: () => import('@/views/resourceManage/siteManage/index.vue'),
                meta: { title: '区域管理', breadcrumb: true },
            },
            {
                path: 'carType',
                name: 'carType',
                component: () => import('@/views/resourceManage/carType/index.vue'),
                meta: { title: '车型管理', breadcrumb: true },
            },
            {
                path: 'carCompany',
                name: 'carCompany',
                component: () => import('@/views/resourceManage/carCompany/index.vue'),
                meta: { title: '车企管理', breadcrumb: true },
            },
            {
                path: 'lineManage',
                name: 'lineManage',
                component: () => import('@/views/resourceManage/lineManage/index.vue'),
                meta: { title: '运营线路管理', breadcrumb: true },
            },
            {
                path: 'nmc',
                name: 'nmc',
                component: () => import('@/views/resourceManage/nmc/index.vue'),
                meta: { title: '无人车管理', breadcrumb: true },
            },
            // {
            //     path: 'roadManage',
            //     name: 'roadManage',
            //     component: () => import('@/views/resourceManage/siteManage/index.vue'),
            //     meta: { title: '道路管理', breadcrumb: true },
            // },
            {
                path: 'companyDesktop',
                name: 'companyDesktop',
                component: () => import('@/views/resourceManage/companyDesktop/index.vue'),
                meta: { title: '企业工作台', breadcrumb: true },
            },
            {
                path: 'violationReport',
                name: 'violationReport',
                component: () => import('@/views/resourceManage/violationReport/index.vue'),
                meta: { title: '违章上报', breadcrumb: true },
            },
        ]
    },
        // 资源管理 >  场站管理
        {
            path: '/violation',
            name: 'violation',
            component: () => import(/*webpackChunkName: "demo"*/ '@/layout/index.vue'),
            meta: { title: '违章管理', breadcrumb: true },
            children: [
                {
                    path: 'violationReport',
                    name: 'violationReport',
                    component: () => import('@/views/resourceManage/violationReport/index.vue'),
                    meta: { title: '违章上报', breadcrumb: true },
                },
            ]
        },
    // 日志管理
    {
        path: '/logs',
        name: 'logs',
        component: () => import(/*webpackChunkName: "demo"*/ '@/layout/index.vue'),
        meta: { title: '日志管理', breadcrumb: true },
        children: [
            // // 运营管理   定时启动
            // {
            //     path: 'timingStart',
            //     name: 'timingStart',
            //     component: () => import('@/views/Logs/timingStart/index.vue'),
            //     meta: { title: '定时启动', breadcrumb: true },
            // },
            // 报警日志
            {
                path: 'alarm',
                name: 'alarm',
                component: () => import('@/views/Logs/alarm/index.vue'),
                meta: { title: '报警日志', breadcrumb: true },
            },
            // 系统日志
            {
                path: 'runLogs',
                name: 'runLogs',
                component: () => import('@/views/Logs/runLogs/index.vue'),
                meta: { title: '运行日志', breadcrumb: true },

            },
            // 系统日志
            {
                path: 'systemLogs',
                name: 'systemLogs',
                component: () => import('@/views/Logs/systemLogs/index.vue'),
                meta: { title: '系统日志', breadcrumb: true },
            },
            // 原始事件日志
            {
                path: 'rawEvent',
                name: 'rawEvent',
                component: () => import('@/views/Logs/rawEvent/index.vue'),
                meta: { title: '原始事件日志', breadcrumb: true },
            },
            // 事件配置
            {
                path: 'eventConfig',
                name: 'eventConfig',
                component: () => import('@/views/Logs/eventConfig/index.vue'),
                meta: { title: '事件配置', breadcrumb: true },
            },

        ]
    },

    // 错误页面
    {
        path: '/404',
        name: '404',
        hidden: true,
        meta: {
            describe: '页面找不到了',
            errorCode: 404
        },
        component: () => import(/*webpackChunkName: "errorPage"*/ '@/views/error/errorView.vue')
    },
    {
        path: '/error',
        name: 'error',
        hidden: true,
        meta: {
            describe: '服务器错误，请联系系统管理员',
            errorCode: 500
        },
        component: () => import(/*webpackChunkName: "errorPage"*/ '@/views/error/errorView.vue')
    },
    {
        path: '/:catchAll(.*)',
        redirect: '/404',
        hidden: true
    }
]

export default routes;
